/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.worlds.object;

import java.awt.Color;
import net.worlds.WorldsException;
import net.worlds.PropChangeHandler;
import net.worlds.ui.edge.ELabel;


public class UILabel extends UIComponent{
    public UILabel() throws WorldsException
    {
        super("UILabel");
        component = new ELabel("Text");
        addPropChangeHandler("Text", new PropChangeHandler()
        {
            @Override
            public void handle(Object oldValue, Object value) throws WorldsException {
                ((ELabel)component).setText(value.toString());
            }
        });
        addPropChangeHandler("TextColor", new PropChangeHandler()
        {
            @Override
            public void handle(Object oldValue, Object value) throws WorldsException {
                ((ELabel)component).setColor(((Color)value));
            }
        });
    }
}
